package com.stylefeng.guns.core.common.Tools;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * @Author zhangyalin
 * @Date 2018-09-07 15:50 PM
 * @describe 返回结果封装类
 **/
@Data
@AllArgsConstructor
@NoArgsConstructor
public class CodeMsg {
    private int retCode;
    private String message;
    // 按照模块定义CodeMsg
    // 通用异常
    public static CodeMsg SUCCESS = new CodeMsg(0,"success");
    public static CodeMsg SERVER_EXCEPTION = new CodeMsg(500100,"服务端异常");
    public static CodeMsg PARAMETER_ISNULL = new CodeMsg(500101,"输入参数为空");
    // 业务异常
    public static CodeMsg USER_NOT_EXSIST = new CodeMsg(500102,"用户不存在");
    public static CodeMsg TOKEN_VRRIFY_ERROR = new CodeMsg(500103,"token验证失败");
    public static CodeMsg ONLINE_USER_OVER = new CodeMsg(500103,"在线用户数超出允许登录的最大用户限制。");
    public static CodeMsg SESSION_NOT_EXSIST =  new CodeMsg(500104,"不存在离线session数据");
    public static CodeMsg NOT_FIND_DATA = new CodeMsg(500105,"查找不到对应数据");
    public static CodeMsg USER_ALREADY_REG = new CodeMsg (401, "该(手机号/邮箱)已经注册");
    public static CodeMsg NOT_FIND_ORDER_LINE = new CodeMsg(500106,"查找不到对应的线路基本信息");
    public static CodeMsg USER_INSERT_SUCESS = new CodeMsg (200, "添加用户成功");
    public static CodeMsg USER_INSERT_ERROR = new CodeMsg (402, "添加用户失败");
    public static CodeMsg DICT_INSERT_ERROR = new CodeMsg (400, "该字典分类已存在");
    
    public static CodeMsg ACCOUNT_FREEZED= new CodeMsg(401, "账号被冻结");
    public static CodeMsg USERPWD_NOT_EXIST= new CodeMsg(1003,"用户名不存在或者密码错误");
    public static CodeMsg INVALID_KAPTCHA =new CodeMsg(1004, "验证码不正确");
    public static CodeMsg UNI_INDEX_ERROR =new CodeMsg(1062, "字段值重复，入库失败");

    public static CodeMsg STATUS_OPERATE_FAILED = new CodeMsg(10001, "");
}
